#include "Log.hpp"
#include "ThreadPool.hpp"
#include "Task.hpp"
#include <memory>

using namespace LogModule;
using namespace ThreadPoolModule;

int main()
{
    Enable_Console_Log_Strategy();
    //ThreadPool<task_t> *tp = ThreadPool<task_t>::GetInstance();

    int count = 10;
    while(count--)
    {
        ThreadPool<task_t>::GetInstance()->Equeue(DownLoad);
        sleep(1);
    }

    sleep(5);

    ThreadPool<task_t>::GetInstance()->Stop();
    //sleep(5);
    ThreadPool<task_t>::GetInstance()->Join();
    // std::unique_ptr<LogStrategy> strategy = std::make_unique<ConsoleStrategy>();
    // std::unique_ptr<LogStrategy> strategy = std::make_unique<FileLogStrategy>();
    // strategy->SyncLog("hello");
    // logger.EnableFileLogStrategy();
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello" << 3.14;
    return 0;
};